package ooday03;

public class Duck extends Animal implements LayEggs,Swim{
    Duck() {
    }

    Duck(String name, int age, String color) {
        super(name, age, color);
    }

    void eat(){
        System.out.println(age+"岁的"+color+"色的鸭子"+name+"正在吃虫子。。。");
    }
    public void swim(){
        System.out.println(age+"岁的"+color+"色的鸭子"+name+"正在游泳。。。");
    }
    public void layEggs(){
        System.out.println(age+"岁的"+color+"色的鸭子"+name+"正在下蛋。。。");
    }

}
